home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
bit
/
src
/
ulib
/
replace.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
899b
|
36 lines
/***********************************************************************
* $Id: replace.c,v 0.80 1994/02/24 09:48:11 zhao Exp $
*
*. Copyright(c) 1993,1994 by T.C. Zhao
* All rights reserved.
*.
* simulation of some handy function if not available otherwise
* on the system: strdup, strcasecmp etc.
***********************************************************************/
#if !defined(lint) && defined(F_ID)
char *id_sfake = "$Id: replace.c,v 0.80 1994/02/24 09:48:11 zhao Exp $";
#endif
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "ulib.h"
#if (defined(NO_STRDUP) || defined(__STRICT_ANSI__)) && !defined(__sgi__)
char *
strdup(const char *s)
{
char *p = malloc(strlen(s) + 1);
return p ? strcpy(p, s) : 0;
}
int
strcasecmp(const char *s1, const char *s2)
{
fputs("strcasecmp: not written yet\n", stderr);
return strcmp(s1, s2);
}
#endif